﻿@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
<base target="_self" />
@Html.Partial("LoadPanelPartial")
    <title>Index</title>    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>

    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)
<script>
    $(document).ready(function () {
        var hdjsAlert = $("#hdjsAlert").val();
        if (hdjsAlert != "") {
            alert(hdjsAlert);
        }
        if (hdjsAlert == "操作成功") {
            lpModal.Hide();
            window.returnValue = 'S';
            window.close();
        }
    });


    function click() {
        if (FSeq.GetValue()==null || FSeq.GetValue() == "") {
            FSeq.SetErrorText("请选择退回到目录");
            FSeq.SetIsValid(false);
            return;
        }
        
        form1.submit();
    }

    function codeCancel() {
        window.returnValue = 'c';
        window.close();
    }
</script>
</head>
<body>
    @using (Html.BeginForm("Save", "ReturnDlg", FormMethod.Post, new { id = "form1" }))
    {
    <div>
        <table>
        <tr>
        <td>
        退回原因:
        </td>
        <td>
        @Html.DevExpress().Memo(settings =>
   {
       settings.Name = "FNote";
       settings.Width = 250;
       settings.Properties.Rows = 4;
       settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
       settings.Properties.ValidationSettings.EnableCustomValidation = true;
   }).GetHtml()
        </td>
        </tr>
        <tr>
        <td>
        退回到:
        </td>
        <td>
  @Html.DevExpress().ComboBox(settings =>
{
    settings.Name = "FSeq";
    settings.Width = 250;
    settings.Properties.TextField = "FNodeName";
    settings.Properties.ValueField = "FSeq";
    settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
    settings.Properties.ValidationSettings.EnableCustomValidation = true;
    if (ViewData["Showdata"] != null)
    {
        settings.SelectedIndex = (ViewData["Showdata"] as System.Data.DataTable).Rows.Count - 1;
    }
}).BindList(ViewData["Showdata"]).GetHtml()
        </td>
        </tr>
        <tr>
        <td colspan='2' align="center">
        <table>
        <tr>
        <td>
        @Html.DevExpress().Button(settings =>
   {
       settings.Name = "Save";
       settings.ClientSideEvents.Click = "click";
       settings.ControlStyle.CssClass = "button";
       settings.Text = "确定";
       settings.CausesValidation = false;
       settings.Images.Image.Url = Url.Content("~/Content/ControlImages/button_save.png");
   }).GetHtml()
   </td>
    <td>
     @Html.DevExpress().Button(settings =>
{

    settings.Name = "btnCancel";
    settings.Text = "取消";
    settings.ClientSideEvents.Click = "codeCancel";
    settings.Images.Image.Url = Url.Content("~/Content/ControlImages/no.png");
    settings.CausesValidation = false;
}).GetHtml()
</td>
        </tr>
        </table>
        </td>
        </tr>
        </table>
        @Html.Hidden("hdjsAlert", ViewData["jsAlert"])
        @Html.Hidden("hidtableName", ViewData["tableName"])
        @Html.Hidden("hidid", ViewData["id"])
        @Html.Hidden("hidfeq", ViewData["feq"])
        
    </div>
    }
</body>
</html>
